:- module(cumulative).
:- export profile / 4.
:- export cumulative / 4.
:- comment(summary, "Cumulative scheduling constraint library for FD").
:- comment(author, "Vassilis Liatsos").
:- comment(copyright, "Imperial College London and ICL").
:- comment(date, "$Date: 2002/07/26 13:25:02 $").
:- comment(desc, "    This library implements the cumulative scheduling constraint for the\n    FD solver.  It provides weaker propagation than the two edge finder\n    libraries: edge_finder and edge_finder3.\n").
:- comment(cumulative / 4, [amode : cumulative(+, +, +, ++), args : ["StartTimes" : "List of start times for tasks (fd variables or integers)", "Durations" : "List of duration for tasks (fd variables or integers)", "Resources" : "List of resource uages by tasks (fd variables or integers)", "ResourceLimit" : "Maximum amount of resource available (integer)"], summary : "Cumulative constraint on specified tasks.", desc : html("<P>\n   A cumulative scheduling constraint. StartTimes, Durations and Resources\n   are lists of equal length N of finite domain variable or integers.\n   ResourceLimit is an integer. The declarative meaning is:\n   If there are N tasks, each starting at a certain start time, having\n   a certain duration and consuming a certain (constant) amount of\n   resource, then the sum of resource usage of all the tasks does not\n   exceed ResourceLimit at any time.\n   The (ic/fd)_edge_finder and (ic/fd)_edge_finder3 libraries implementation of this\n   predicate can provide stronger propagations.\n</P>")]).
:- comment(profile / 4, [amode : profile(+, +, +, ?), args : ["StartTimes" : "List of start times for tasks (fd variables or integers)", "Durations" : "List of duration for tasks (fd variables or integers)", "Resources" : "List of resource usages by tasks (fd variables or integers)", "Profile" : "List of resource usage at the start of each task"], summary : "Cumulative constraint on specified tasks.", desc : html("<P>\n\n   StartTimes, Durations, Resources and Profile are lists of equal length N\n   of finite domain variable or integers with the same meaning as in\n   cumulative/4.  The list Profile indicates the level of resource usage at\n   the starting point of each task.\n</P>")]).
